package com.yansl.http.annotation;

import java.lang.annotation.*;

import org.springframework.http.HttpMethod;

import com.yansl.http.intercepter.DefaultHttpIntercepter;
import com.yansl.http.intercepter.HttpIntercepter;

/**
 * @description: 远程HTTP定义
 * @author: eshengtai
 * @create: 2022-12-17 10:17
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD })
@Documented
public @interface URI {
    /**
     * 请求方式：HttpMethod.POST \ HttpMethod.GET
     * 
     * @return
     */
    HttpMethod httpMethod() default HttpMethod.GET;

    /**
     * 请求地址 <br/>
     * 写法： <br/>
     * 1、httpPrefix + uri 拼接地址 <br/>
     * 2、uri 全地址 <br/>
     * 
     * @return
     */
    String uri() default "";

    /**
     * 自定义拦截器
     * 
     * @return
     */
    Class<? extends HttpIntercepter> intercepter() default DefaultHttpIntercepter.class;
}
